<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script src="./vue.js"></script>
</head>
<body>
<div id="app">
  <button @click="btn">按钮</button>
  <div>
    <label>
      姓名:<input type="text" v-model="name">
    </label><br>
    <label>
      年龄:<input type="text" v-model="age">
    </label><br>
    <span>我叫{{ name }}!今年{{ age }}岁了。</span>
  </div>
</div>
<script>
  new Vue({
    el: '#app',
    data() {
      return {
        name: 'aaa',
        age: 18
      }
    },
    mounted() {
      console.log('Mounted', this)
    },
    methods: {
      btn() {
        console.log(this.name)
      },
    }
  })
</script>

</body>
</html>
